home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / NetWarmer / source / EditM.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-22  |  1.5 KB  |  105 lines  |  [TEXT/KAHL]

  1. /* EditM.c */
  2. /* Created 3/13/4 1:08 PM by AppMaker */
  3.  
  4.  
  5. #include "Globals.h"
  6. #include "ResourceDefs.h"
  7. #include "DoScrap.h"
  8.  
  9. #include "EditM.h"
  10.  
  11. #define NIL            0L
  12.  
  13. /*----------*/
  14. void InitEditM ()
  15. {
  16. } /*InitEditM*/
  17.  
  18. /*----------*/
  19. static void DoUndo (void);
  20. static void DoUndo ()
  21. {
  22. } /*DoUndo ()*/
  23. /*----------*/
  24. static void DoCut (void);
  25. static void DoCut ()
  26. {
  27.     if (cur->text != nil) {
  28.         TECut (cur->text);
  29.         scrapDirty = true;
  30.     }
  31. } /*DoCut*/
  32.  
  33. /*----------*/
  34. static void DoCopy (void);
  35. static void DoCopy ()
  36. {
  37.     if (cur->text != nil) {
  38.         TECopy (cur->text);
  39.         scrapDirty = true;
  40.     }
  41. } /*DoCopy*/
  42.  
  43. /*----------*/
  44. static void DoPaste (void);
  45. static void DoPaste ()
  46. {
  47.     if (cur->text != nil) {
  48.         TEPaste (cur->text);
  49.     }
  50. } /*DoPaste*/
  51.  
  52. /*----------*/
  53. static void DoClear (void);
  54. static void DoClear ()
  55. {
  56.     if (cur->text != nil) {
  57.         TEDelete (cur->text);
  58.     }
  59. } /*DoClear*/
  60.  
  61. /*----------*/
  62. static void DoSelectAll (void);
  63. static void DoSelectAll ()
  64. {
  65.     if (cur->text != nil) {
  66.         TESetSelect (0, 32767, cur->text);
  67.     }
  68. } /*DoSelectAll*/
  69.  
  70. /*----------*/
  71. static void DoShowClipboard (void);
  72. static void DoShowClipboard ()
  73. {
  74. } /*DoShowClipboard ()*/
  75. /*----------*/
  76. void DoEdit (itemNr)
  77. short        itemNr;
  78. {
  79.     switch (itemNr) {
  80.     case EditUndo:
  81.             DoUndo ();
  82.         break;
  83.     case EditCut:
  84.             DoCut ();
  85.         break;
  86.     case EditCopy:
  87.             DoCopy ();
  88.         break;
  89.     case EditPaste:
  90.             DoPaste ();
  91.         break;
  92.     case EditClear:
  93.             DoClear ();
  94.         break;
  95.     case EditSelectAll:
  96.             DoSelectAll ();
  97.         break;
  98.     case EditShowClipboard:
  99.             DoShowClipboard ();
  100.         break;
  101.         } /*switch*/
  102. } /*DoEdit*/
  103.  
  104. /* EditM */
  105.